﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VirtualTournaments.Business.Tournaments;

namespace VirtualTournaments.Business.Bets
{
    public class ConcreteBetTypeFactory : IBetTypeFactory
    {

        public BetType[] createBetTypesFor(ICompetition competition)
        {

            if (typeof(Match).IsInstanceOfType(competition))
            {
                return new BetType[] { new ThreeWaysBetType((Match)competition)};
            }
            else if (typeof(Tournament).IsInstanceOfType(competition))
            {
                return new BetType[] { new TournamentPodiumBetType((Tournament)competition) };
            }
            else {
                return new BetType[] { };
            }
        }
    }
}
